package com.baosight.xdata.redis;

import java.util.List;

public class ConsumerInfo {
    private String name;
    private Long pending;
    private Long idle;

    public ConsumerInfo(String name, Long pending, Long idle) {
        this.name = name;
        this.pending = pending;
        this.idle = idle;
    }

    public static ConsumerInfo Builder(List<Object> consumerInfoList){
        return new ConsumerInfo( (String) consumerInfoList.get(1), (Long) consumerInfoList.get(3),  (Long) consumerInfoList.get(5));
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getPending() {
        return pending;
    }

    public void setPending(Long pending) {
        this.pending = pending;
    }

    public Long getIdle() {
        return idle;
    }

    public void setIdle(Long idle) {
        this.idle = idle;
    }

    @Override
    public String toString() {
        return "ConsumerInfo{" +
                "name='" + name + '\'' +
                ", pending=" + pending +
                ", idle=" + idle +
                '}';
    }
}
